const QR = require("./weapp-qrcode"); //引入weapp-qrcode
export const createQRCode = (params) => {
  return new Promise((resolve, reject) => {
    const imgData = QR.drawImg(params, {
      typeNumber: 4, // 密度
      errorCorrectLevel: "L", // 纠错等级
      size: 800, // 白色边框
    });
    if (imgData) {
      resolve(imgData);
    } else {
      reject(false);
    }
  });
};
